﻿@model Order
@using (Html.BeginForm())
{
    <div class="modal-body">
        <div>
            <p>
                <span>标 记：</span> <span>
                    <label class="radio inline">
                        <input type="radio" name="flag" @(Model.SellerFlag == 1 ? "checked='checked'" : string.Empty) value="1" />
                        <i class="icon-flag icon-large" style="color: red;"></i>
                    </label>
                    <label class="radio inline">
                        <input type="radio" name="flag" @(Model.SellerFlag == 2 ? "checked='checked'" : string.Empty) value="2" />
                        <i class="icon-flag icon-large" style="color: #FFCC33;"></i>
                    </label>
                    <label class="radio inline">
                        <input type="radio" name="flag" @(Model.SellerFlag == 3 ? "checked='checked'" : string.Empty) value="3" />
                        <i class="icon-flag icon-large" style="color: green;"></i>
                    </label>
                    <label class="radio inline">
                        <input type="radio" name="flag" @(Model.SellerFlag == 4 ? "checked='checked'" : string.Empty) value="4" />
                        <i class="icon-flag icon-large" style="color: blue;"></i>
                    </label>
                    <label class="radio inline">
                        <input type="radio" name="flag" @(Model.SellerFlag == 5 ? "checked='checked'" : string.Empty) value="5" />
                        <i class="icon-flag icon-large" style="color: #9900FF;"></i>
                    </label>
                </span>
            </p>
            <p>
                备 忘：<textarea name="memo" cols="50" rows="3" maxlength="100" style="width: 450px;">@(Model.SellerMemo)</textarea></p>
            <p class="help-block">
                备忘信息作为你对这笔订单的备忘记录，仅自己可见。请勿备注个人敏感信息。<span class="color-red">（<100字）</span>
            </p>
        </div>
    </div>
    <div class="modal-footer">
        <p id="memo-message" class="pull-left color-red">
        </p>
        <a class="btn" href="#" data-dismiss="modal">关闭</a>
        <button type="button" class="btn btn-primary" onclick="submitMemo(this.form)">
            确 认</button>
    </div>
}
<script type="text/javascript">
    function submitMemo(form) {
        var param = $(form).serialize();
        $.postJSON(form.action, param, function (result) {
            if (result.Status == false) {
                //alert(result.Message);
                $('#memo-message').html(result.Message);
            }
            else {
                $('#memo-message').css('color', 'green').html("备忘已成功保存！");
            }
        });
    }
</script>
